package fr.afcepf.atod;


public class Telephone extends AbstractPhone implements Appelable {
	public static int truc = 0;
	private String marque;
	private String os;

	private Puce puce;

	public Telephone() {
		truc++;
	}

	public Telephone(String marque, String os) {
		super();
		this.marque = marque;
		this.os = os;
	}

	public String getMarque() {
		return marque;
	}

	public void setMarque(String marque) {
		this.marque = marque;
	}

	public String getOs() {
		return os;
	}

	public void setOs(String os) {
		this.os = os;
	}

	public Puce getPuce() {
		return puce;
	}

	public void setPuce(Puce puce) {
		this.puce = puce;
	}

	@Override
	public String toString() {
		return "Telephone [marque=" + marque + ", os=" + os + ", puce=" + puce
				+ "]" + truc;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((marque == null) ? 0 : marque.hashCode());
		result = prime * result + ((os == null) ? 0 : os.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Telephone other = (Telephone) obj;
		if (marque == null) {
			if (other.marque != null)
				return false;
		} else if (!marque.equals(other.marque))
			return false;
		if (os == null) {
			if (other.os != null)
				return false;
		} else if (!os.equals(other.os))
			return false;
		return true;
	}

}
